home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 27 / develop issue 27 code / shapewalker gx / pathwalking.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-11  |  1.2 KB  |  33 lines

  1. /************************************
  2.  
  3.     PathWalking.h:  Header file for shape walking library.
  4.     
  5.     Copyright ©, 1996, Apple Computer Inc.
  6.       Daniel I. Lipton
  7.       
  8.  
  9. ************************************/
  10.  
  11. #include <Types.h>
  12. #include <GXTypes.h>
  13. #include <GXMath.h>
  14. #include <GXGraphics.h>
  15.  
  16.  
  17. /* shape walker function return result is true if we want to stop walking */
  18.  
  19. typedef Boolean (*TpwMovetoProc)(gxPoint *p, void* refcon) ;            // function is called to move to a new point (start new contour)
  20. typedef Boolean (*TpwLinetoProc)(gxPoint *p, void* refcon) ;            // function is called to draw a line from current point to p
  21. typedef Boolean (*TpwCurvetoProc)(gxPoint p[3], void* refcon) ;        // function is called to draw a curve from current point (which will be p[0] through p[1] to p[2]
  22. typedef Boolean (*TpwClosepathProc)(void* refcon) ;                                // function is called to close a contour.
  23.  
  24.  
  25.  
  26. /* return result will be true if path walking terminated by one of the callbacks. */
  27.  
  28. Boolean  ShapeWalker(gxShape theShape,     TpwMovetoProc DoMoveto, 
  29.                                                                                 TpwLinetoProc DoLineto, 
  30.                                                                                 TpwCurvetoProc DoCurveto, 
  31.                                                                                 TpwClosepathProc DoClosepath,
  32.                                                                                 void* refcon);
  33.